package com.yootk.main;

import com.yootk.aware.impl.YootkDataBase;
import com.yootk.config.EmpConfig;
import com.yootk.di.config.MessageConfig;
import com.yootk.di.config.MessageProperties;
import com.yootk.di.service.MessageService;
import com.yootk.listener.Emp;
import com.yootk.listener.MessageListener;
import com.yootk.listener.NewsListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.concurrent.TimeUnit;

public class StartYootkSpringApplication { // Spring容器的启动类
    private static final Logger LOGGER = LoggerFactory.getLogger(StartYootkSpringApplication.class);
    public static void main(String[] args) throws Exception {
        // 容器的启动需要使用到特定的接口和类，此时的配置文件保存在CLASSPATH路径下，所以直接使用此类实例化
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
        context.scan("com.yootk.aware");
        context.refresh();
        YootkDataBase dataBase = context.getBean(YootkDataBase.class) ;
        LOGGER.info("{}",dataBase.getConfig());
    }


}

